<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://www.ccut.edu.cn/saturn" prefix="saturn"%>
<html>
<head>
<title>menu列表</title>
<%@ include file="/jsp/include/header/meta.jsp"%>
<%@ include file="/jsp/include/header/stylesheettag.jsp"%>
<%@ include file="/jsp/include/header/javascript.jsp"%>
<script language="javaScript">
function first(id,bundleName){
	menuForm.action = "<%=request.getContextPath()%>/edu.ccut.saturn.manager.menu.impl::/menuModule/action/MenuItemUptoFirst.action?id="+id+"&bundleName="+bundleName+"&menuType=root";
	menuForm.submit();
}
function up(id,bundleName){
	menuForm.action = "<%=request.getContextPath()%>/edu.ccut.saturn.manager.menu.impl::/menuModule/action/MenuItemUp.action?id="+id+"&bundleName="+bundleName+"&menuType=root";
	menuForm.submit();
}
function down(id,bundleName){
	menuForm.action = "<%=request.getContextPath()%>/edu.ccut.saturn.manager.menu.impl::/menuModule/action/MenuItemDown.action?id="+id+"&bundleName="+bundleName+"&menuType=root";
	menuForm.submit();
}
function last(id,bundleName){
	menuForm.action = "<%=request.getContextPath()%>/edu.ccut.saturn.manager.menu.impl::/menuModule/action/MenuItemDowntoLast.action?id="+id+"&bundleName="+bundleName+"&menuType=root";
	menuForm.submit();
}
function childMenus(id,bundleName){
	menuForm.action = "<%=request.getContextPath()%>/edu.ccut.saturn.manager.menu.impl/menuModule/page/childMenuItemList.jsp?id="+id+"&bundleName="+bundleName;
	menuForm.submit();
}
</script>
</head>

<body>

<saturn:formBeans name="menuForm" title="根菜单列表"
		action="${pageContext.request.contextPath}/com.cchd.saturn.authority/authResourcePage/resourceList.jsp"
		method="post">
	<td>
	
		<saturn:table id="rootMenu" value="${menu.allRootMenuItemInfo}" item="var" isCursor="true"
				isPagepilot="true" percount="10">    
				<saturn:tableColumn title="菜单名">
				<a href="#" onclick="childMenus('<saturn:out value="${var.id}"/>','<saturn:out value="${var.menuInfo.bundleSymbolicName}"/>')"><saturn:out value="${var.id}"/></a>
				</saturn:tableColumn>            
				<saturn:tableColumn title="bundle名"><saturn:out value="${var.menuInfo.bundleSymbolicName}"/>
				</saturn:tableColumn>
				<saturn:tableColumn title="菜单路径"><saturn:out value="${var.path}"/></saturn:tableColumn>
				<saturn:tableColumn title="操作">
				<a href="#" onclick="first('<saturn:out value="${var.id}"/>','<saturn:out value="${var.menuInfo.bundleSymbolicName}"/>')">最上</a>
				|<a href="#" onclick="up('<saturn:out value="${var.id}"/>','<saturn:out value="${var.menuInfo.bundleSymbolicName}"/>')">上移</a>
				|<a href="#" onclick="down('<saturn:out value="${var.id}"/>','<saturn:out value="${var.menuInfo.bundleSymbolicName}"/>')">下移</a>
				|<a href="#" onclick="last('<saturn:out value="${var.id}"/>','<saturn:out value="${var.menuInfo.bundleSymbolicName}"/>')">最下</a>
				</saturn:tableColumn>
		</saturn:table>
	</td>
</saturn:formBeans>
</body>
</html>